GH-50579: [Python] Fix test_categorical_order_survives_roundtrip pandas 3.X deprecation#50608
Conversation
…p pandas 3.0.3 deprecation
rok
left a comment
There was a problem hiding this comment.
This is straightforward enough, thanks!
|
@github-actions crossbow submit wheel-macos-monterey-cp311-cp311-* wheel-manylinux-2-28-cp311-cp311-* wheel-musllinux-1-2-cp311-cp311-arm64 wheel-windows-*-amd64 |
|
Revision: 73e1511 Submitted crossbow builds: ursacomputing/crossbow @ actions-726ee0454c |
|
The failing wheel jobs are all due to simdjson work in progress. Merging! |
|
Thanks for the quick fix @GujaLomsadze ! |
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 10cf43b. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
Follow-up to #50543.
test_categorical_order_survives_roundtripconstructs apd.Categoricalwith value "a" not in categories["b","c","d"]. pandas 3.0.3raises a deprecation for out-of-category values, which #50543's filterwarnings
config now turns into an error - failing nightly wheels across platforms.
What changes are included in this PR?
Replace the out-of-category
"a"value with an explicitNone, preserving thetest's intent (ordered categorical with non-sorted categories survives a Parquet
roundtrip, ARROW-6302) plus a null.
Are these changes tested?
Yes. Reproduced the failure with pandas 3.0.3, confirmed the test passes after
the change; all categorical tests in the module pass.
Are there any user-facing changes?
No.
Closes #50579.